import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false;

const cpn = {
  template:"<div>{{message}}</div>",
  data(){
    return {
      message:"我是组件"
    }
  }
};

new Vue({
  el: '#app',
  // components: { App },
  // template: '<App/>'
  render:function (createElement) {
    //1.普通用法
    //createElement("标签",{标签属性},[""])
    //return createElement("h2",{class:"h2"},["hello world"]);
    // return createElement("h2",
    //   {class:"h2"},
    //   ["hello world",createElement("button",["按钮"])]
    // );

    //2.传入组件对象
    //return createElement(cpn);
     return createElement(App);
  }
});


